#include"Led.h"
void Led_Serve(unsigned char Address,Enable)
{
		static unsigned char LED_State=0x00;
		static unsigned char LED_OldState=0xFF;
		if(Enable)
		LED_State|=0x01<<Address;//把选中的位置1，其它位保持不变
		else
		{
			LED_State&=~(0x01<<Address);//把选中的位置0，其它位保持不变
		}
		if(LED_State!=LED_OldState)/*此句保证了LED只会执行一次*/
		{
			P1=~LED_State;
			LED_OldState=LED_State;
		}
			
}